package com.example.designpatterns.decorator;

// 具体装饰器：为文本添加加粗效果
public class BoldDecorator extends TextDecorator {
    public BoldDecorator(TextComponent textComponent) {
        super(textComponent);
    }
    
    @Override
    public String getContent() {
        return "**" + textComponent.getContent() + "**";
    }

    @Override
    public void display() {
        System.out.println(getContent());
    }
}